package org.icress.fusion.shiro

import java.util.Date;

class Role {
    
    String name
    Date dateCreated
    Date lastUpdated

    static hasMany = [ users: User, permissions: String ]
    static belongsTo = User

    static constraints = {
        name(nullable: false, blank: false, unique: true, maxSize:50)
    }
    
    String toString() {
        return "$name"
    }
    
    static mapping = {
        table 'SHIRO_ROLE'
    }
}
